package com.atguigu.tingshu.album.api;

import com.atguigu.tingshu.album.service.TestService;
import com.atguigu.tingshu.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/album/test")
public class TestController {

    @Autowired
    private TestService testService;
    @GetMapping("/getData/{id}")
    public String testCache(@PathVariable Long id) {
        String data = testService.getData(id);
        return data;
    }

    @PutMapping("/updateData/{id}")
    public String updateData(@PathVariable Long id) {
       testService.updateData(id);
       return "更新成功";
    }


}
